//
//  BulkorderCell.m
//  WorkNest
//
//  Created by qbm360 on 15/8/27.
//  Copyright (c) 2015年 nest. All rights reserved.
//

#import "BulkorderCell.h"

@interface BulkorderCell ()

@property (weak, nonatomic) IBOutlet UILabel *status;
@property (weak, nonatomic) IBOutlet UILabel *totalQuantity;
@property (weak, nonatomic) IBOutlet UILabel *totalPrice;
@property (weak, nonatomic) IBOutlet UILabel *perPrice;
@property (weak, nonatomic) IBOutlet UILabel *requiredExplain;
@property (weak, nonatomic) IBOutlet UILabel *userReceiveAddress;
@property (weak, nonatomic) IBOutlet UILabel *deliveryTime;
@property (weak, nonatomic) IBOutlet UILabel *deliveryWay;
@property (weak, nonatomic) IBOutlet UILabel *orderId;
@property (weak, nonatomic) IBOutlet UILabel *orderTime;

@end

@implementation BulkorderCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(BulkorderModel *)model {
    _model = model;
    self.orderId.text = _model.orderId;
    self.status.text = _model.statusNote;
    self.totalQuantity.text = _model.totalQuantity;
    self.totalPrice.text = _model.totalPrice;
    self.perPrice.text = _model.perPrice;
    self.requiredExplain.text = _model.requiredExplain;
    self.deliveryTime.text = [_model.deliveryTime substringToIndex:10];
    self.deliveryWay.text = _model.deliveryWay;
    self.orderTime.text = [_model.orderTime substringToIndex:10];
}

- (void)setAddressModel:(AddressModel *)addressModel {
    _addressModel = addressModel;
    self.userReceiveAddress.text = [NSString stringWithFormat:@"%@%@%@%@",_addressModel.province,_addressModel.city,_addressModel.district,_addressModel.address];
}

@end
